package cn.doitedu.day03

import scala.collection.mutable

object SetDemo2 {

  def main(args: Array[String]): Unit = {

    //可变的Set
    val s1 = new mutable.HashSet[Int]()

    //添加元素
    s1.add(5)
    s1 += 6

    //删除元素
    val b1 = s1.remove(5)
    val b2 = s1.remove(8)
    println(b1)
    println(b2)

    val b3 = s1 -= 8

  }

}
